Smart buttons

Introduction to Controls/XML Elements

You can use the following controls to create scripts. Controls are configured in the Smart Buttons Editor using either intuitive screens or XML.

The Smart Buttons Editor comes in two modes:

  • Easy Mode (Advanced GDS Command Helper) to create basic features and controls. A limited number of controls are available in Easy Mode. In the following table, controls marked with an E in the description are available in Easy Mode.
  • Standard Mode to create more complex features and controls. All controls are available in Standard Mode, except Command Form Splitter <Br>.

Control

XML Element

Description

User Interface Elements
Text Field

TextBox

E A graphical control element that enables agents to input text information to be used by the program.

Can be used to ask a question to the agent and collect the answer as a variable.

Text Label

TextBlock

E Adds a label, which is a line with text, to the agent prompt.

Drop-Down List ComboBox E Allows the agent to select a value from predefined answers.
Date Selector DataPicker

E Displays date representation, where the agent can select a single value.

List Elements CheckListBox

Displays a list of elements from a collection of elements, either as a check box list or a radio button list.

Questions Block QuestionsBlock

Group prompts together on one screen.

The Questions Block Designer can be used design and modify customized dialog boxes, including images, color group boxes, and single check boxes. Elements (controls) can be placed anywhere on the Windows canvas.

Show Message ShowMessage

E Displays messages with an OK button in the terminal window or in a box on the screen.

Logical Operations
Loops <ForEach>

A loop is a sequence of statements that is specified once, but can be carried out several times in succession.

The code "inside" the loop can be obeyed either:

  • A specified number of times (For Loop).

  • Once for each of a collection of items (ForEach Loop)

Break Loop

<BreakForEach>

Breaks a loop. If the <BreakForEach> element is used within the loop body and the Condition is agreed, it stops the loop iterations and goes immediately after the loop body.

If Then Else <ConditionalAction> The most basic flow statement, which tells a script to execute a certain section of code only if a particular test evaluates to true.
Break Script Processing <Exit>

Stop processing the script.

For example, a script with a drop-down list contains two possible answers. An agent choose either:

  • Answer 1 to display a message.

  • Answer 2 to stop the script (close or stop running other conditions, and then go back to terminal).

Other Controls
Run Terminal Command RunCommand E Sends terminal (host) commands for Travelport+ (1G). It can be either simple command or command that contains variable.
Read From Excel ReadFromExcel Reads information from a specified Excel file.
Arithmetical Operation ArithmeticalOperation Calculates either static numbers or variables.
String Operation StringOperation

Performs multiple operations on text, such as:

  • Trimming.

  • Replacing part of the text with different text. Finding an index of a specific element in the text.

  • Changing text to upper/lower case.

  • Finding specific text inside of text with regex.

Get Text from Terminal GetString Captures text from the Terminal Window. The text can be read from a specific column and row or read using a regular expression (regex).
Run Other Button RunOtherButton E Links a Smart Buttons script to an existing script. One script can trigger another one.
Date/Time DateTime Adds dates to a script. It can read the current date, and allow a specific number of days to add or subtract.
Manage Collection ManageCollection

This control can:

  • Extract one specific element from a collection (minimum number, maximum number, last element, or first element).

  • Calculate the number of elements in a collection or an average of all numeric elements in a collection (count).

  • Filter out the collection to include only unique elements.

Variable Variable A variable is a storage location paired with an associated symbolic name (variable name). The variable contains some known or unknown quantity of information (value).
Fill-In Forms SetStringBlock  
Run Application RunExe Executes any applications, including opening a website.
API Call APICall Sends information to an external database via an API and receive back information from that source.
JavaScript Snippets JsSnippet Consumes JavaScript snippets inside of a Smart Buttons script.
File Operation FileOperation Writes to and reads from a text file, such as TXT and CSV files.
Command Form Splitter Br Easy Mode Only Creates a line between multiple commands.